#
# BEGIN SONGBIRD GPL
#
# This file is part of the Songbird web player.
#
# Copyright(c) 2005-2008 POTI, Inc.
# http://songbirdnest.com
#
# This file may be licensed under the terms of of the
# GNU General Public License Version 2 (the "GPL").
#
# Software distributed under the License is distributed
# on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
# express or implied. See the GPL for the specific language
# governing rights and limitations.
#
# You should have received a copy of the GPL along with this
# program. If not, go to http://www.gnu.org/licenses/gpl.html
# or write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# END SONGBIRD GPL
#

DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@

include $(DEPTH)/build/autodefs.mk

target_name = sbMacBookExtras

CMM_SRCS = sbMacBookExtrasService.mm \
           sbMacBookExtrasModule.mm \
           $(NULL)

CMM_INCLUDES = $(DEPTH)/components/library/base/public \
               $(DEPTH)/components/mediacore/base/public \
               $(DEPTH)/components/controller/public \
               /usr/include/ \
               $(MOZSDK_INCLUDE_DIR) \
               $(MOZSDK_INCLUDE_DIR)/nspr \
               $(MOZSDK_INCLUDE_DIR)/necko \
               $(MOZSDK_INCLUDE_DIR)/xpcom \
               $(MOZSDK_INCLUDE_DIR)/string \
               $(MOZSDK_IDL_DIR) \
               $(NULL)

IS_COMPONENT = 1

DYNAMIC_LIB = $(target_name)$(DLL_SUFFIX)

DYNAMIC_LIB_OBJS = $(patsubst %.mm,%$(OBJ_SUFFIX),$(notdir $(CMM_SRCS)))

DYNAMIC_LIB_EXTRA_IMPORTS = nspr4 \
                            xpcom \
                            xpcomglue_s \
                            $(NULL)

DYNAMIC_LIB_IMPORT_PATHS = $(MOZSDK_LIB_DIR) \
                           $(NULL)

DYNAMIC_LIB_EXTRA_FLAGS= -framework Foundation \
                         -framework System \
                         -framework Carbon \
                         -framework IOKit \
                         -framework Cocoa \
                         -framework CoreAudio \
                         -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk

DYNAMIC_LIB_EXTRA_IMPORTS += mozjs

# put this in our staging directory
EXTENSION_STAGE_DIR = $(SONGBIRD_OBJDIR)/extensions/songbird-macbook-extras/.xpistage

# into components/
SONGBIRD_COMPONENTS = $(DYNAMIC_LIB)

include $(topsrcdir)/build/rules.mk

